package org.jeecg.modules.crawler.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.crawler.entity.CueCrawlerInfo;

import java.util.List;
import java.util.Map;

/**
 * @Description: 爬虫信息
 * @Author: jeecg-boot
 * @Date:   2020-05-02
 * @Version: V1.0
 */
public interface ICueCrawlerInfoService extends IService<CueCrawlerInfo> {

    /**
     * 初始化关键词和规则
     * @return
     */
    public Map<String,Object> initCrawlerData();

    /**
     * 设置关键词
     */
    public void  keywordOk(String keyword);

    /**
     * 设置规则
     * @param paramMap
     */
    public void ruleOk(Map<String, Object> paramMap);

    /**
     * 改变爬虫状态
     * @param id
     * @param state
     */
    public void changeCrawlerState(String id, String state);

    /**
     * 查询爬虫执行记录
     * @param id
     * @return
     */
    public List<Map<String,Object>> querySpiderLog(String id);

}
